Skip to content

Generate symbols.o for proc-macros too #142641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2025

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jun 17, 2025

To ensure used statics are functioning correctly for proc-macros too.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 17, 2025
@bjorn3 bjorn3 added A-proc-macros Area: Procedural macros F-used_with_arg `#![feature(used_with_arg)]` labels Jun 17, 2025
@bjorn3 bjorn3 force-pushed the proc_macro_symbols_o branch from 8d4e4ef to 3d5a656 Compare June 18, 2025 07:55
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Jun 18, 2025
@bjorn3 bjorn3 marked this pull request as ready for review June 18, 2025 07:56
@rustbot
Copy link
Collaborator

rustbot commented Jun 18, 2025

jieyouxu is not on the review rotation at the moment.
They may take a while to respond.

@rustbot
Copy link
Collaborator

rustbot commented Jun 18, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 18, 2025

This PR modifies run-make tests.

cc @jieyouxu

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jieyouxu
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 18, 2025

📌 Commit 3d5a656 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 18, 2025
@jieyouxu
Copy link
Member

Actually, can you add a ignore-cross-compile? This can be a host-only test, right? (Context: we're trying to fix run-make to cross-by-default.)
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 18, 2025
@jieyouxu
Copy link
Member

(r=me after)

@bjorn3
Copy link
Member Author

bjorn3 commented Jun 18, 2025

If run_make_support implicitly adds --target when cross-testing, I would expect it to work just fine when cross-testing. It doesn't run the proc-macro, only checks that the linker doesn't discard the symbol.

@jieyouxu
Copy link
Member

Hm right. I'll revisit the directives, but no need to block this PR on that.

@jieyouxu
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 18, 2025

📌 Commit 3d5a656 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 18, 2025
@jieyouxu
Copy link
Member

Actually, since this is not in a rollup yet, I'd like to try land #139244 first (that has been a long-standing problem). I think this might still need sth like

//@ needs-target-std
//@ needs-crate-type: proc-macro

after #139244, test-various will cause us to try to produce cross-compiled artifacts for wasm tagrets.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 18, 2025
@bjorn3 bjorn3 force-pushed the proc_macro_symbols_o branch from 3d5a656 to bd2dd25 Compare June 19, 2025 10:34
@bjorn3 bjorn3 force-pushed the proc_macro_symbols_o branch from bd2dd25 to cb88811 Compare June 23, 2025 14:34
@bjorn3
Copy link
Member Author

bjorn3 commented Jun 23, 2025

Disabled the test when cross-compiling to match other proc-macro run-make tests.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 23, 2025
@jieyouxu
Copy link
Member

Right.
@bors r+

@bors
Copy link
Collaborator

bors commented Jun 24, 2025

📌 Commit cb88811 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 24, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 24, 2025
…youxu

Generate symbols.o for proc-macros too

To ensure used statics are functioning correctly for proc-macros too.
bors added a commit that referenced this pull request Jun 24, 2025
Rollup of 8 pull requests

Successful merges:

 - #140622 (compiletest: Improve diagnostics for line annotation mismatches)
 - #142641 (Generate symbols.o for proc-macros too)
 - #142695 (Port `#[rustc_skip_during_method_dispatch]` to the new attribute system)
 - #142742 ([win][aarch64] Fix linking statics on Arm64EC, take 2)
 - #142894 (phantom_variance_markers: fix identifier usage in macro)
 - #142928 (Fix hang in --print=file-names in bootstrap)
 - #142930 (Account for beta revisions when normalizing versions)
 - #142932 (rustdoc-json: Keep empty generic args if parenthesized)

r? `@ghost`
`@rustbot` modify labels: rollup
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 24, 2025
…youxu

Generate symbols.o for proc-macros too

To ensure used statics are functioning correctly for proc-macros too.
@workingjubilee
Copy link
Member

Failed in #142942 (comment)

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 24, 2025
To ensure used statics are functioning correctly for proc-macros too.
@bjorn3 bjorn3 force-pushed the proc_macro_symbols_o branch from cb88811 to 2bb98e2 Compare June 27, 2025 10:03
@bjorn3
Copy link
Member Author

bjorn3 commented Jun 27, 2025

Marked the test as ignored on Windows as llvm-readobj --all doesn't show local symbols on Windows.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 27, 2025
@jieyouxu
Copy link
Member

Huh, thanks.
@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Jun 28, 2025

📌 Commit 2bb98e2 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 28, 2025
bors added a commit that referenced this pull request Jun 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #142021 (Doc: clarify priority of lint level sources)
 - #142367 (Add regression test for #137857 to ensure that we generate intra doc links for extern crate items.)
 - #142641 (Generate symbols.o for proc-macros too)
 - #142889 (Clarify doc comment on unix OpenOptions)
 - #143063 (explain `ImportData::imported_module`)
 - #143088 (Improve documentation of `TagEncoding`)
 - #143135 (fix typos on some doc comments)
 - #143138 (Port `#[link_name]` to the new attribute parsing infrastructure)
 - #143155 (`librustdoc` house-keeping 🧹)
 - #143169 (Remove unused feature gates)
 - #143171 (Fix the span of trait bound modifier `[const]`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e68f13c into rust-lang:master Jun 29, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 29, 2025
rust-timer added a commit that referenced this pull request Jun 29, 2025
Rollup merge of #142641 - bjorn3:proc_macro_symbols_o, r=jieyouxu

Generate symbols.o for proc-macros too

To ensure used statics are functioning correctly for proc-macros too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-proc-macros Area: Procedural macros A-run-make Area: port run-make Makefiles to rmake.rs F-used_with_arg `#![feature(used_with_arg)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants